//
//  NSObject+ObjectOrNilForKey.m
//  AiBangMall
//
//  Created by 邓志平 on 2017/3/7.
//  Copyright © 2017年 DongHui. All rights reserved.
//

#import "NSObject+ObjectOrNilForKey.h"

@implementation NSObject (ObjectOrNilForKey)
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict
{
    id object = [dict objectForKey:aKey];
    return [object isEqual:[NSNull null]] ? nil : object;
}
@end
